/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package textfilewriter.entity.dimension;

import java.util.Date;

/**
 *
 * @author GiangLT
 */
public class DateDimension {

    private static final long serialVersionUID = 1L;
    private String dateKey;
    private Date dayEndDate;
    private int dayTimeSpan;
    private String monthKey;
    private Date monthEndDate;
    private int monthTimeSpan;
    private String quarterKey;
    private Date quarterEndDate;
    private int quarterTimeSpan;
    private String yearKey;
    private Date yearEndDate;
    private int yearTimeSpan;

    public DateDimension() {
    }

    public DateDimension(String dateKey) {
        this.dateKey = dateKey;
    }

    public DateDimension(String dateKey, Date dayEndDate, int dayTimeSpan, String monthKey) {
        this.dateKey = dateKey;
        this.dayEndDate = dayEndDate;
        this.dayTimeSpan = dayTimeSpan;
        this.monthKey = monthKey;
    }

    public String getDateKey() {
        return dateKey;
    }

    public void setDateKey(String dateKey) {
        this.dateKey = dateKey;
    }

    public Date getDayEndDate() {
        return dayEndDate;
    }

    public void setDayEndDate(Date dayEndDate) {
        this.dayEndDate = dayEndDate;
    }

    public int getDayTimeSpan() {
        return dayTimeSpan;
    }

    public void setDayTimeSpan(int dayTimeSpan) {
        this.dayTimeSpan = dayTimeSpan;
    }

    public String getMonthKey() {
        return monthKey;
    }

    public void setMonthKey(String monthKey) {
        this.monthKey = monthKey;
    }

    public Date getMonthEndDate() {
        return monthEndDate;
    }

    public void setMonthEndDate(Date monthEndDate) {
        this.monthEndDate = monthEndDate;
    }

    public int getMonthTimeSpan() {
        return monthTimeSpan;
    }

    public void setMonthTimeSpan(int monthTimeSpan) {
        this.monthTimeSpan = monthTimeSpan;
    }

    public String getQuarterKey() {
        return quarterKey;
    }

    public void setQuarterKey(String quarterKey) {
        this.quarterKey = quarterKey;
    }

    public Date getQuarterEndDate() {
        return quarterEndDate;
    }

    public void setQuarterEndDate(Date quarterEndDate) {
        this.quarterEndDate = quarterEndDate;
    }

    public int getQuarterTimeSpan() {
        return quarterTimeSpan;
    }

    public void setQuarterTimeSpan(int quarterTimeSpan) {
        this.quarterTimeSpan = quarterTimeSpan;
    }

    public String getYearKey() {
        return yearKey;
    }

    public void setYearKey(String yearKey) {
        this.yearKey = yearKey;
    }

    public Date getYearEndDate() {
        return yearEndDate;
    }

    public void setYearEndDate(Date yearEndDate) {
        this.yearEndDate = yearEndDate;
    }

    public int getYearTimeSpan() {
        return yearTimeSpan;
    }

    public void setYearTimeSpan(int yearTimeSpan) {
        this.yearTimeSpan = yearTimeSpan;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (dateKey != null ? dateKey.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DateDimension)) {
            return false;
        }
        DateDimension other = (DateDimension) object;
        if ((this.dateKey == null && other.dateKey != null) || (this.dateKey != null && !this.dateKey.equals(other.dateKey))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "textfilewriter.entity.DimDate[ dateKey=" + dateKey + " ]";
    }
}
